def char_prop(table, index, prop)
  table[index] ||= []
  table[index].concat(prop)
end

def range_prop(table, range, prop)
  range.each do | index |
    table[index] ||= []
    table[index].concat(prop)
  end
end

table = {}

# xml 1.0
char_prop(table, 0x9, [ 'UNICODE_XML_CHAR', 'UNICODE_XML_SPACE' ])
char_prop(table, 0xA, [ 'UNICODE_XML_CHAR', 'UNICODE_XML_SPACE' ])
char_prop(table, 0xD, [ 'UNICODE_XML_CHAR', 'UNICODE_XML_SPACE' ])
char_prop(table, 0x20, [ 'UNICODE_XML_SPACE' ])
range_prop(table, 0x20..0xD7FF, [ 'UNICODE_XML_CHAR' ])
range_prop(table, 0xE000..0xFFFD, [ 'UNICODE_XML_CHAR' ])

# Letter ::= BaseChar | Ideographic
range_prop(table, 0x0041..0x005A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0061..0x007A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x00C0..0x00D6, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x00D8..0x00F6, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x00F8..0x00FF, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0100..0x0131, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0134..0x013E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0141..0x0148, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x014A..0x017E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0180..0x01C3, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x01CD..0x01F0, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x01F4..0x01F5, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x01FA..0x0217, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0250..0x02A8, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x02BB..0x02C1, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0386, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0388..0x038A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x038C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x038E..0x03A1, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x03A3..0x03CE, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x03D0..0x03D6, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x03DA, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x03DC, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x03DE, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x03E0, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x03E2..0x03F3, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0401..0x040C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x040E..0x044F, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0451..0x045C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x045E..0x0481, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0490..0x04C4, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x04C7..0x04C8, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x04CB..0x04CC, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x04D0..0x04EB, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x04EE..0x04F5, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x04F8..0x04F9, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0531..0x0556, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0559, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0561..0x0586, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x05D0..0x05EA, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x05F0..0x05F2, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0621..0x063A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0641..0x064A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0671..0x06B7, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06BA..0x06BE, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06C0..0x06CE, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06D0..0x06D3, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x06D5, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06E5..0x06E6, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0905..0x0939, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x093D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0958..0x0961, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0985..0x098C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x098F..0x0990, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0993..0x09A8, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09AA..0x09B0, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x09B2, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09B6..0x09B9, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09DC..0x09DD, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09DF..0x09E1, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09F0..0x09F1, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A05..0x0A0A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A0F..0x0A10, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A13..0x0A28, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A2A..0x0A30, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A32..0x0A33, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A35..0x0A36, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A38..0x0A39, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A59..0x0A5C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0A5E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A72..0x0A74, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A85..0x0A8B, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0A8D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A8F..0x0A91, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A93..0x0AA8, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0AAA..0x0AB0, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0AB2..0x0AB3, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0AB5..0x0AB9, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0ABD, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0AE0, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B05..0x0B0C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B0F..0x0B10, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B13..0x0B28, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B2A..0x0B30, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B32..0x0B33, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B36..0x0B39, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0B3D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B5C..0x0B5D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B5F..0x0B61, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B85..0x0B8A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B8E..0x0B90, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B92..0x0B95, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B99..0x0B9A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0B9C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B9E..0x0B9F, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0BA3..0x0BA4, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0BA8..0x0BAA, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0BAE..0x0BB5, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0BB7..0x0BB9, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C05..0x0C0C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C0E..0x0C10, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C12..0x0C28, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C2A..0x0C33, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C35..0x0C39, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C60..0x0C61, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C85..0x0C8C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C8E..0x0C90, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C92..0x0CA8, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0CAA..0x0CB3, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0CB5..0x0CB9, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0CDE, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0CE0..0x0CE1, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D05..0x0D0C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D0E..0x0D10, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D12..0x0D28, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D2A..0x0D39, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D60..0x0D61, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E01..0x0E2E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0E30, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E32..0x0E33, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E40..0x0E45, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E81..0x0E82, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0E84, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E87..0x0E88, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0E8A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0E8D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E94..0x0E97, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E99..0x0E9F, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0EA1..0x0EA3, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0EA5, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0EA7, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0EAA..0x0EAB, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0EAD..0x0EAE, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0EB0, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0EB2..0x0EB3, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0EBD, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0EC0..0x0EC4, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0F40..0x0F47, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0F49..0x0F69, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x10A0..0x10C5, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x10D0..0x10F6, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1100, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1102..0x1103, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1105..0x1107, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1109, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x110B..0x110C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x110E..0x1112, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x113C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x113E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1140, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x114C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x114E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1150, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1154..0x1155, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1159, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x115F..0x1161, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1163, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1165, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1167, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1169, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x116D..0x116E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1172..0x1173, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1175, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x119E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x11A8, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x11AB, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x11AE..0x11AF, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x11B7..0x11B8, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x11BA, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x11BC..0x11C2, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x11EB, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x11F0, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x11F9, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1E00..0x1E9B, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1EA0..0x1EF9, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1F00..0x1F15, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1F18..0x1F1D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1F20..0x1F45, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1F48..0x1F4D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1F50..0x1F57, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1F59, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1F5B, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1F5D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1F5F..0x1F7D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1F80..0x1FB4, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1FB6..0x1FBC, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x1FBE, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1FC2..0x1FC4, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1FC6..0x1FCC, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1FD0..0x1FD3, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1FD6..0x1FDB, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1FE0..0x1FEC, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1FF2..0x1FF4, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x1FF6..0x1FFC, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x2126, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x212A..0x212B, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x212E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x2180..0x2182, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x3041..0x3094, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x30A1..0x30FA, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x3105..0x312C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0xAC00..0xD7A3, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x4E00..0x9FA5, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x3007, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x3021..0x3029, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])

# NameChar ::= Letter
#   | Digit
#   | '.' 
#   | '-'
#   | '_'
#   | ':'
#   | CombiningChar
#   | Extender
range_prop(table, 0x0030..0x0039, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0660..0x0669, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06F0..0x06F9, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0966..0x096F, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09E6..0x09EF, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A66..0x0A6F, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0AE6..0x0AEF, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B66..0x0B6F, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0BE7..0x0BEF, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C66..0x0C6F, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0CE6..0x0CEF, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D66..0x0D6F, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E50..0x0E59, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0ED0..0x0ED9, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0F20..0x0F29, [ 'UNICODE_XML_NAME_CHAR' ])

char_prop(table, 0x2E, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x2D, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x5F, [ 'UNICODE_XML_NAME_CHAR' ])

range_prop(table, 0x0300..0x0345, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0360..0x0361, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0483..0x0486, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0591..0x05A1, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x05A3..0x05B9, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x05BB..0x05BD, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x05BF, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x05C1..0x05C2, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x05C4, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x064B..0x0652, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0670, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06D6..0x06DC, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06DD..0x06DF, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06E0..0x06E4, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06E7..0x06E8, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x06EA..0x06ED, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0901..0x0903, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x093C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x093E..0x094C, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x094D, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0951..0x0954, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0962..0x0963, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0981..0x0983, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x09BC, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x09BE, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x09BF, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09C0..0x09C4, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09C7..0x09C8, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09CB..0x09CD, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x09D7, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x09E2..0x09E3, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0A02, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0A3C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0A3E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0A3F, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A40..0x0A42, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A47..0x0A48, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A4B..0x0A4D, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A70..0x0A71, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0A81..0x0A83, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0ABC, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0ABE..0x0AC5, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0AC7..0x0AC9, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0ACB..0x0ACD, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B01..0x0B03, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0B3C, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B3E..0x0B43, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B47..0x0B48, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B4B..0x0B4D, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B56..0x0B57, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0B82..0x0B83, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0BBE..0x0BC2, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0BC6..0x0BC8, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0BCA..0x0BCD, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0BD7, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C01..0x0C03, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C3E..0x0C44, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C46..0x0C48, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C4A..0x0C4D, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C55..0x0C56, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0C82..0x0C83, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0CBE..0x0CC4, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0CC6..0x0CC8, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0CCA..0x0CCD, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0CD5..0x0CD6, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D02..0x0D03, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D3E..0x0D43, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D46..0x0D48, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0D4A..0x0D4D, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0D57, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0E31, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E34..0x0E3A, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0E47..0x0E4E, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0EB1, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0EB4..0x0EB9, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0EBB..0x0EBC, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0EC8..0x0ECD, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0F18..0x0F19, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0F35, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0F37, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0F39, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0F3E, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0F3F, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0F71..0x0F84, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0F86..0x0F8B, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0F90..0x0F95, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0F97, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0F99..0x0FAD, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x0FB1..0x0FB7, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0FB9, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x20D0..0x20DC, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x20E1, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x302A..0x302F, [ 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x3099, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x309A, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])

char_prop(table, 0x00B7, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x02D0, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x02D1, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0387, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0640, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0E46, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x0EC6, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
char_prop(table, 0x3005, [ 'UNICODE_XML_LETTER', 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x3031..0x3035, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x309D..0x309E, [ 'UNICODE_XML_NAME_CHAR' ])
range_prop(table, 0x30FC..0x30FE, [ 'UNICODE_XML_NAME_CHAR' ])

puts "#define UNICODE_XML_NONE 0\n"
puts "#define UNICODE_XML_CHAR 1\n"
puts "#define UNICODE_XML_LETTER 2\n"
puts "#define UNICODE_XML_NAME_CHAR 4\n"
puts "#define UNICODE_XML_SPACE 8\n\n"
puts "static const unsigned char unicode_map[] = {\n"
(0x0000..0xFFFF).each do | index |
  value = table.key?(index) ? table[index] : [ 'UNICODE_XML_NONE' ]
  printf("%s, // %0#6X\n", value.join('|'), index)
end
puts "};\n"
